<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/11/6
 * Time: 16:48
 */

namespace app\adminapiv3\controller;

//更新
class ServerUpdate extends Base
{
    /**
     * @name 在线更新
     * @author wx
     * @date 2019/11/6 16:50
     */
    public function online()
    {
        global $logContent;
        $logContent = '产品在线更新';

        $server = new \app\adminapiv3\service\ServerUpdate();
        $server->online();

        $this->jsonOutPut();
    }

    /**
     * @name 离线更新
     * @author wx
     * @date 2019/11/6 16:51
     */
    public function offline()
    {
        global $logContent;
        $logContent = '产品离线更新';

        //接收参数
        $file = request()->file('file');

        $server = new \app\adminapiv3\service\ServerUpdate();
        $server->offline($file);

        $this->jsonOutPut();
    }

}